home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue39 / mime / main.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1998-08-02  |  1.3 KB  |  65 lines

  1. unit main;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, Base64;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     eInFile: TEdit;
  12.     eOutFile: TEdit;
  13.     Label1: TLabel;
  14.     Label2: TLabel;
  15.     bnChooseFile1: TButton;
  16.     bnChooseFile2: TButton;
  17.     bnEncode: TButton;
  18.     bnDecode: TButton;
  19.     OpenDialog1: TOpenDialog;
  20.     procedure bnChooseFile1Click(Sender: TObject);
  21.     procedure bnChooseFile2Click(Sender: TObject);
  22.     procedure bnEncodeClick(Sender: TObject);
  23.     procedure bnDecodeClick(Sender: TObject);
  24.   private
  25.     { Private declarations }
  26.   public
  27.     { Public declarations }
  28.   end;
  29.  
  30. var
  31.   Form1: TForm1;
  32.  
  33. implementation
  34.  
  35. {$R *.DFM}
  36.  
  37. procedure TForm1.bnChooseFile1Click(Sender: TObject);
  38. begin
  39.      if OpenDialog1.Execute then
  40.      begin
  41.          eInFile.Text:=OpenDialog1.FileName;
  42.      end;
  43. end;
  44.  
  45. procedure TForm1.bnChooseFile2Click(Sender: TObject);
  46. begin
  47.      if OpenDialog1.Execute then
  48.      begin
  49.          eOutFile.Text:=OpenDialog1.FileName;
  50.      end;
  51.  
  52. end;
  53.  
  54. procedure TForm1.bnEncodeClick(Sender: TObject);
  55. begin
  56.      encode(eInFile.Text,eOutFile.Text);
  57. end;
  58.  
  59. procedure TForm1.bnDecodeClick(Sender: TObject);
  60. begin
  61.      decode(eInFile.Text,eOutFile.Text);
  62. end;
  63.  
  64. end.
  65.